import request from '../utils/request';

const api_name = '/user'

export default {
    // 用户后台登录
    login(username, password) {
        return request({
            url: `${api_name}/login`,
            method: 'post',
            data: {
                username,
                password
            }
        })
    },
    // 获取用户信息
    getInfo() {
        return request({
            url: `${api_name}/info`,
            method: 'get'
        })
    }
}